home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 081 / upl.arc / RENUMHID.UPL < prev    next >
Encoding:
Text File  |  1987-03-08  |  3.0 KB  |  83 lines

  1. ===============================================================================
  2. = This routine fixes a little problem I encountered using Opus's barricaded   =
  3. = message areas.  I have one local sysop who prefers to call my board and     =
  4. = read SYSOP and MEADOW here, rather than receiving them himself.  To         =
  5. = accommodate him, I set up 2 new barricaded message areas, linked them to    =
  6. = the SYSOP and MEADOW areas I use, and gave him the passwords.  So far, so   =
  7. = good.  But when you try to renumber the messages, you have problems... if   =
  8. = I renumber 40 and 41 (the real areas, set to Sysop priv), then his last     =
  9. = message read counters (which say 97 and 98) don't get updated.  If I renum  =
  10. = 97 and 98, then a remote Sysop we have doesn't get his area 40 and 41       =
  11. = counters fixed.  If I renumber them both, the second time you visit the same=
  12. = area RENUM happily proclaims that all messages are already in order.  The   =
  13. = solution?  Change the barricaded message area numbers to match the real     =
  14. = area numbers before running RENUM, so that everybody's counters get fixed,  =
  15. = and then change that one user's area numbers back to 97 and 98 again        =
  16. = afterwards.  Even if you don't have this problem, this is a good example    =
  17. = of having more than one program within the same command file.  And of having=
  18. = more comments in a command file than you have commands.                     =
  19. ===============================================================================
  20.  
  21. ifeq @name 'art walker'          Keep looping until we hit the user we want
  22.   set @var0 0
  23.  
  24.   Next1:                         Loop through all of his last message read area
  25.   ifeq @mra@var0 97              numbers until we get the one we want, and then
  26.     set @mra@var0 40             fix it.
  27.     print 'Changed area 97 to area 40 for @name.'
  28.   else
  29.     add @var0 1                  If this wasn't the right counter, try the
  30.     ifle @var0 9                 next one.
  31.       goto Next1
  32.     endif
  33.   endif
  34.  
  35.   set @var0 0
  36.  
  37.   Next2:
  38.   ifeq @mra@var0 98
  39.     set @mra@var0 41
  40.     print 'Changed area 98 to area 41 for @name.'
  41.   else
  42.     add @var0 1
  43.     ifle @var0 9
  44.       goto Next2
  45.     endif
  46.   endif
  47.   end  (stop after doing this... no need to loop through the remaining users)
  48. endif
  49. run
  50.  
  51. dos "renum -s -n 0 150 40 -r 40  -n 0 150 41 -r 41"  Run RENUM on the areas.
  52. end                                                  Loop not applicable,
  53. run                                                  so don't.
  54.  
  55. ifeq @name 'art walker'          Reset the updated message counters to the
  56.   set @var0 0                    correct area numbers.
  57.  
  58.   Next1:
  59.   ifeq @mra@var0 40
  60.     set @mra@var0 97
  61.     print 'Changed area 40 to area 97 for @name.'
  62.   else
  63.     add @var0 1
  64.     ifle @var0 9
  65.       goto Next1
  66.     endif
  67.   endif
  68.  
  69.   set @var0 0
  70.  
  71.   Next2:
  72.   ifeq @mra@var0 41
  73.     set @mra@var0 98
  74.     print 'Changed area 41 to area 98 for @name.'
  75.   else
  76.     add @var0 1
  77.     ifle @var0 9
  78.       goto Next2
  79.     endif
  80.   endif
  81.   end
  82. endif
  83.